using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVKSTORNO
    {
        public DataRow Convert2VKSTORNO(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVKSTORNO(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VKSMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VKSAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["VKSAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["VKSAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["VKSAENDST"] = " ".PadRight(0 ); 
         dwReturn["VKSGRD"] = " ".PadRight(2 ); 
         dwReturn["VKSAUFART"] = " ".PadRight(2 ); 
         dwReturn["VKSAEDAT"] = " ".PadRight(0 ); 
         dwReturn["VKSORDER"] = " ".PadRight(4 ); 
         dwReturn["VKSPRGRP"] = " ".PadRight(8 ); 
         dwReturn["VKSPROJNR"] = " ".PadRight(5 ); 
         dwReturn["VKSPOSTYP"] = " ".PadRight(3 ); 
         dwReturn["VKSVB"] = " ".PadRight(3 ); 
         dwReturn["VKSVG"] = " ".PadRight(3 ); 
         dwReturn["VKSKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["VKSVERBNR"] = " ".PadRight(8 ); 
         dwReturn["VKSZENTRR"] = " ".PadRight(1 ); 
         dwReturn["VKSPRDGR"] = " ".PadRight(3 ); 
         dwReturn["VKSARTGRP"] = " ".PadRight(3 ); 
         dwReturn["VKSZIELGR"] = " ".PadRight(4 ); 
         dwReturn["VKSPVGRP"] = " ".PadRight(3 ); 
         dwReturn["VKSKOLL"] = " ".PadRight(5 ); 
         dwReturn["VKSVART"] = " ".PadRight(24 ); 
         dwReturn["VKSVFARBE"] = " ".PadRight(10 ); 
         dwReturn["VKSVZENSUR"] = " ".PadRight(1 ); 
         dwReturn["VKSVAUFMART"] = " ".PadRight(2 ); 
         dwReturn["VKSDKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["VKSDWERK"] = " ".PadRight(3 ); 
         dwReturn["VKSDABT"] = " ".PadRight(3 ); 
         dwReturn["VKSDART"] = " ".PadRight(20 ); 
         dwReturn["VKSDVAR"] = " ".PadRight(2 ); 
         dwReturn["VKSFFARBE"] = " ".PadRight(10 ); 
         dwReturn["VKSDESS"] = " ".PadRight(10 ); 
         dwReturn["VKSCOLORIT"] = " ".PadRight(10 ); 
         dwReturn["VKSBESCHICH"] = " ".PadRight(10 ); 
         dwReturn["VKSUMSATZAUFTR"] = " ".PadRight(0 ); 
         dwReturn["VKSPREIS"] = " ".PadRight(0 ); 
         dwReturn["VKSMENGE1"] = " ".PadRight(0 ); 
         dwReturn["VKSMENGE2"] = " ".PadRight(0 ); 
         dwReturn["VKSMENGE3"] = " ".PadRight(0 ); 
         dwReturn["VKSMENGE4"] = " ".PadRight(0 ); 
         dwReturn["VKSZUGET1"] = " ".PadRight(0 ); 
         dwReturn["VKSZUGET2"] = " ".PadRight(0 ); 
         dwReturn["VKSZUGET3"] = " ".PadRight(0 ); 
         dwReturn["VKSZUGET4"] = " ".PadRight(0 ); 
         dwReturn["VKSRESERV1"] = " ".PadRight(0 ); 
         dwReturn["VKSRESERV2"] = " ".PadRight(0 ); 
         dwReturn["VKSRESERV3"] = " ".PadRight(0 ); 
         dwReturn["VKSRESERV4"] = " ".PadRight(0 ); 
         dwReturn["VKSWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["VKSKURS"] = " ".PadRight(0 ); 
         dwReturn["VKSBETRAG"] = " ".PadRight(0 ); 
         dwReturn["VKSHWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["VKSHEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["VKSHEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["VKSFEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["VKSFEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["VKSAUFTRMENGE"] = " ".PadRight(0 ); 
         dwReturn["VKSMEEH"] = " ".PadRight(3 ); 
         dwReturn["VKSMEEHGRP"] = " ".PadRight(1 ); 
         dwReturn["VKSMEEHFKT"] = " ".PadRight(12 ); 
         dwReturn["VKSPREH"] = " ".PadRight(3 ); 
         dwReturn["VKSPREHGRP"] = " ".PadRight(1 ); 
         dwReturn["VKSPREHFKT"] = " ".PadRight(12 ); 
         dwReturn["VKSUMSATZPRL"] = " ".PadRight(0 ); 
         dwReturn["VKSSACHB"] = " ".PadRight(8 ); 
         dwReturn["VKSDSACHB"] = " ".PadRight(8 ); 
         dwReturn["VKSDRBEST"] = " ".PadRight(1 ); 
         dwReturn["VKSSTORDAT"] = " ".PadRight(0 ); 
         dwReturn["VKSKOAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["VKSKOAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["VKSKOAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["VKSKOAUFART"] = " ".PadRight(2 ); 
         dwReturn["VKSSTORUSER"] = " ".PadRight(8 ); 
         dwReturn["VKSFILLER"] = " ".PadRight(23 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVKSTORNO(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVKSTORNO(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVKSTORNO(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVKSTORNO(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVKSTORNO(dwLocal, ITXDBVERSION);
            }
            UpdateVKSTORNO(dwLocal);
        }
        public void InsertVKSTORNO(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VKSTORNO(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVKSTORNO(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VKSTORNO WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VKSTORNO  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VKSTORNO";
            Return = Result;
            return Return;
        }
        public void DeleteVKSTORNO(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VKSTORNO   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVKSTORNO(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VKSTORNO SET "
                    +"VKSMANDANT= :VKSMANDANT,"
                    +"VKSAUFKRS= :VKSAUFKRS,"
                    +"VKSAUFLFD= :VKSAUFLFD,"
                    +"VKSAUFPOS= :VKSAUFPOS,"
                    +"VKSAENDST= :VKSAENDST,"
                    +"VKSGRD= :VKSGRD,"
                    +"VKSAUFART= :VKSAUFART,"
                    +"VKSAEDAT= :VKSAEDAT,"
                    +"VKSORDER= :VKSORDER,"
                    +"VKSPRGRP= :VKSPRGRP,"
                    +"VKSPROJNR= :VKSPROJNR,"
                    +"VKSPOSTYP= :VKSPOSTYP,"
                    +"VKSVB= :VKSVB,"
                    +"VKSVG= :VKSVG,"
                    +"VKSKUNDNR= :VKSKUNDNR,"
                    +"VKSVERBNR= :VKSVERBNR,"
                    +"VKSZENTRR= :VKSZENTRR,"
                    +"VKSPRDGR= :VKSPRDGR,"
                    +"VKSARTGRP= :VKSARTGRP,"
                    +"VKSZIELGR= :VKSZIELGR,"
                    +"VKSPVGRP= :VKSPVGRP,"
                    +"VKSKOLL= :VKSKOLL,"
                    +"VKSVART= :VKSVART,"
                    +"VKSVFARBE= :VKSVFARBE,"
                    +"VKSVZENSUR= :VKSVZENSUR,"
                    +"VKSVAUFMART= :VKSVAUFMART,"
                    +"VKSDKUNDNR= :VKSDKUNDNR,"
                    +"VKSDWERK= :VKSDWERK,"
                    +"VKSDABT= :VKSDABT,"
                    +"VKSDART= :VKSDART,"
                    +"VKSDVAR= :VKSDVAR,"
                    +"VKSFFARBE= :VKSFFARBE,"
                    +"VKSDESS= :VKSDESS,"
                    +"VKSCOLORIT= :VKSCOLORIT,"
                    +"VKSBESCHICH= :VKSBESCHICH,"
                    +"VKSUMSATZAUFTR= :VKSUMSATZAUFTR,"
                    +"VKSPREIS= :VKSPREIS,"
                    +"VKSMENGE1= :VKSMENGE1,"
                    +"VKSMENGE2= :VKSMENGE2,"
                    +"VKSMENGE3= :VKSMENGE3,"
                    +"VKSMENGE4= :VKSMENGE4,"
                    +"VKSZUGET1= :VKSZUGET1,"
                    +"VKSZUGET2= :VKSZUGET2,"
                    +"VKSZUGET3= :VKSZUGET3,"
                    +"VKSZUGET4= :VKSZUGET4,"
                    +"VKSRESERV1= :VKSRESERV1,"
                    +"VKSRESERV2= :VKSRESERV2,"
                    +"VKSRESERV3= :VKSRESERV3,"
                    +"VKSRESERV4= :VKSRESERV4,"
                    +"VKSWAEHRSL= :VKSWAEHRSL,"
                    +"VKSKURS= :VKSKURS,"
                    +"VKSBETRAG= :VKSBETRAG,"
                    +"VKSHWAEHRSL= :VKSHWAEHRSL,"
                    +"VKSHEUROKURS= :VKSHEUROKURS,"
                    +"VKSHEUROKURSVK= :VKSHEUROKURSVK,"
                    +"VKSFEUROKURS= :VKSFEUROKURS,"
                    +"VKSFEUROKURSVK= :VKSFEUROKURSVK,"
                    +"VKSAUFTRMENGE= :VKSAUFTRMENGE,"
                    +"VKSMEEH= :VKSMEEH,"
                    +"VKSMEEHGRP= :VKSMEEHGRP,"
                    +"VKSMEEHFKT= :VKSMEEHFKT,"
                    +"VKSPREH= :VKSPREH,"
                    +"VKSPREHGRP= :VKSPREHGRP,"
                    +"VKSPREHFKT= :VKSPREHFKT,"
                    +"VKSUMSATZPRL= :VKSUMSATZPRL,"
                    +"VKSSACHB= :VKSSACHB,"
                    +"VKSDSACHB= :VKSDSACHB,"
                    +"VKSDRBEST= :VKSDRBEST,"
                    +"VKSSTORDAT= :VKSSTORDAT,"
                    +"VKSKOAUFKRS= :VKSKOAUFKRS,"
                    +"VKSKOAUFLFD= :VKSKOAUFLFD,"
                    +"VKSKOAUFPOS= :VKSKOAUFPOS,"
                    +"VKSKOAUFART= :VKSKOAUFART,"
                    +"VKSSTORUSER= :VKSSTORUSER,"
                    +"VKSFILLER= :VKSFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VKSMANDANT", OracleType.NVarChar).Value = dwData["VKSMANDANT"].ToString(); 
          or1.Parameters.Add("VKSAUFKRS", OracleType.NVarChar).Value = dwData["VKSAUFKRS"].ToString(); 
          or1.Parameters.Add("VKSAUFLFD", OracleType.NVarChar).Value = dwData["VKSAUFLFD"].ToString(); 
          or1.Parameters.Add("VKSAUFPOS", OracleType.NVarChar).Value = dwData["VKSAUFPOS"].ToString(); 
          or1.Parameters.Add("VKSAENDST", OracleType.NVarChar).Value = dwData["VKSAENDST"].ToString(); 
          or1.Parameters.Add("VKSGRD", OracleType.NVarChar).Value = dwData["VKSGRD"].ToString(); 
          or1.Parameters.Add("VKSAUFART", OracleType.NVarChar).Value = dwData["VKSAUFART"].ToString(); 
          or1.Parameters.Add("VKSAEDAT", OracleType.NVarChar).Value = dwData["VKSAEDAT"].ToString(); 
          or1.Parameters.Add("VKSORDER", OracleType.NVarChar).Value = dwData["VKSORDER"].ToString(); 
          or1.Parameters.Add("VKSPRGRP", OracleType.NVarChar).Value = dwData["VKSPRGRP"].ToString(); 
          or1.Parameters.Add("VKSPROJNR", OracleType.NVarChar).Value = dwData["VKSPROJNR"].ToString(); 
          or1.Parameters.Add("VKSPOSTYP", OracleType.NVarChar).Value = dwData["VKSPOSTYP"].ToString(); 
          or1.Parameters.Add("VKSVB", OracleType.NVarChar).Value = dwData["VKSVB"].ToString(); 
          or1.Parameters.Add("VKSVG", OracleType.NVarChar).Value = dwData["VKSVG"].ToString(); 
          or1.Parameters.Add("VKSKUNDNR", OracleType.NVarChar).Value = dwData["VKSKUNDNR"].ToString(); 
          or1.Parameters.Add("VKSVERBNR", OracleType.NVarChar).Value = dwData["VKSVERBNR"].ToString(); 
          or1.Parameters.Add("VKSZENTRR", OracleType.NVarChar).Value = dwData["VKSZENTRR"].ToString(); 
          or1.Parameters.Add("VKSPRDGR", OracleType.NVarChar).Value = dwData["VKSPRDGR"].ToString(); 
          or1.Parameters.Add("VKSARTGRP", OracleType.NVarChar).Value = dwData["VKSARTGRP"].ToString(); 
          or1.Parameters.Add("VKSZIELGR", OracleType.NVarChar).Value = dwData["VKSZIELGR"].ToString(); 
          or1.Parameters.Add("VKSPVGRP", OracleType.NVarChar).Value = dwData["VKSPVGRP"].ToString(); 
          or1.Parameters.Add("VKSKOLL", OracleType.NVarChar).Value = dwData["VKSKOLL"].ToString(); 
          or1.Parameters.Add("VKSVART", OracleType.NVarChar).Value = dwData["VKSVART"].ToString(); 
          or1.Parameters.Add("VKSVFARBE", OracleType.NVarChar).Value = dwData["VKSVFARBE"].ToString(); 
          or1.Parameters.Add("VKSVZENSUR", OracleType.NVarChar).Value = dwData["VKSVZENSUR"].ToString(); 
          or1.Parameters.Add("VKSVAUFMART", OracleType.NVarChar).Value = dwData["VKSVAUFMART"].ToString(); 
          or1.Parameters.Add("VKSDKUNDNR", OracleType.NVarChar).Value = dwData["VKSDKUNDNR"].ToString(); 
          or1.Parameters.Add("VKSDWERK", OracleType.NVarChar).Value = dwData["VKSDWERK"].ToString(); 
          or1.Parameters.Add("VKSDABT", OracleType.NVarChar).Value = dwData["VKSDABT"].ToString(); 
          or1.Parameters.Add("VKSDART", OracleType.NVarChar).Value = dwData["VKSDART"].ToString(); 
          or1.Parameters.Add("VKSDVAR", OracleType.NVarChar).Value = dwData["VKSDVAR"].ToString(); 
          or1.Parameters.Add("VKSFFARBE", OracleType.NVarChar).Value = dwData["VKSFFARBE"].ToString(); 
          or1.Parameters.Add("VKSDESS", OracleType.NVarChar).Value = dwData["VKSDESS"].ToString(); 
          or1.Parameters.Add("VKSCOLORIT", OracleType.NVarChar).Value = dwData["VKSCOLORIT"].ToString(); 
          or1.Parameters.Add("VKSBESCHICH", OracleType.NVarChar).Value = dwData["VKSBESCHICH"].ToString(); 
          or1.Parameters.Add("VKSUMSATZAUFTR", OracleType.NVarChar).Value = dwData["VKSUMSATZAUFTR"].ToString(); 
          or1.Parameters.Add("VKSPREIS", OracleType.NVarChar).Value = dwData["VKSPREIS"].ToString(); 
          or1.Parameters.Add("VKSMENGE1", OracleType.NVarChar).Value = dwData["VKSMENGE1"].ToString(); 
          or1.Parameters.Add("VKSMENGE2", OracleType.NVarChar).Value = dwData["VKSMENGE2"].ToString(); 
          or1.Parameters.Add("VKSMENGE3", OracleType.NVarChar).Value = dwData["VKSMENGE3"].ToString(); 
          or1.Parameters.Add("VKSMENGE4", OracleType.NVarChar).Value = dwData["VKSMENGE4"].ToString(); 
          or1.Parameters.Add("VKSZUGET1", OracleType.NVarChar).Value = dwData["VKSZUGET1"].ToString(); 
          or1.Parameters.Add("VKSZUGET2", OracleType.NVarChar).Value = dwData["VKSZUGET2"].ToString(); 
          or1.Parameters.Add("VKSZUGET3", OracleType.NVarChar).Value = dwData["VKSZUGET3"].ToString(); 
          or1.Parameters.Add("VKSZUGET4", OracleType.NVarChar).Value = dwData["VKSZUGET4"].ToString(); 
          or1.Parameters.Add("VKSRESERV1", OracleType.NVarChar).Value = dwData["VKSRESERV1"].ToString(); 
          or1.Parameters.Add("VKSRESERV2", OracleType.NVarChar).Value = dwData["VKSRESERV2"].ToString(); 
          or1.Parameters.Add("VKSRESERV3", OracleType.NVarChar).Value = dwData["VKSRESERV3"].ToString(); 
          or1.Parameters.Add("VKSRESERV4", OracleType.NVarChar).Value = dwData["VKSRESERV4"].ToString(); 
          or1.Parameters.Add("VKSWAEHRSL", OracleType.NVarChar).Value = dwData["VKSWAEHRSL"].ToString(); 
          or1.Parameters.Add("VKSKURS", OracleType.NVarChar).Value = dwData["VKSKURS"].ToString(); 
          or1.Parameters.Add("VKSBETRAG", OracleType.NVarChar).Value = dwData["VKSBETRAG"].ToString(); 
          or1.Parameters.Add("VKSHWAEHRSL", OracleType.NVarChar).Value = dwData["VKSHWAEHRSL"].ToString(); 
          or1.Parameters.Add("VKSHEUROKURS", OracleType.NVarChar).Value = dwData["VKSHEUROKURS"].ToString(); 
          or1.Parameters.Add("VKSHEUROKURSVK", OracleType.NVarChar).Value = dwData["VKSHEUROKURSVK"].ToString(); 
          or1.Parameters.Add("VKSFEUROKURS", OracleType.NVarChar).Value = dwData["VKSFEUROKURS"].ToString(); 
          or1.Parameters.Add("VKSFEUROKURSVK", OracleType.NVarChar).Value = dwData["VKSFEUROKURSVK"].ToString(); 
          or1.Parameters.Add("VKSAUFTRMENGE", OracleType.NVarChar).Value = dwData["VKSAUFTRMENGE"].ToString(); 
          or1.Parameters.Add("VKSMEEH", OracleType.NVarChar).Value = dwData["VKSMEEH"].ToString(); 
          or1.Parameters.Add("VKSMEEHGRP", OracleType.NVarChar).Value = dwData["VKSMEEHGRP"].ToString(); 
          or1.Parameters.Add("VKSMEEHFKT", OracleType.NVarChar).Value = dwData["VKSMEEHFKT"].ToString(); 
          or1.Parameters.Add("VKSPREH", OracleType.NVarChar).Value = dwData["VKSPREH"].ToString(); 
          or1.Parameters.Add("VKSPREHGRP", OracleType.NVarChar).Value = dwData["VKSPREHGRP"].ToString(); 
          or1.Parameters.Add("VKSPREHFKT", OracleType.NVarChar).Value = dwData["VKSPREHFKT"].ToString(); 
          or1.Parameters.Add("VKSUMSATZPRL", OracleType.NVarChar).Value = dwData["VKSUMSATZPRL"].ToString(); 
          or1.Parameters.Add("VKSSACHB", OracleType.NVarChar).Value = dwData["VKSSACHB"].ToString(); 
          or1.Parameters.Add("VKSDSACHB", OracleType.NVarChar).Value = dwData["VKSDSACHB"].ToString(); 
          or1.Parameters.Add("VKSDRBEST", OracleType.NVarChar).Value = dwData["VKSDRBEST"].ToString(); 
          or1.Parameters.Add("VKSSTORDAT", OracleType.NVarChar).Value = dwData["VKSSTORDAT"].ToString(); 
          or1.Parameters.Add("VKSKOAUFKRS", OracleType.NVarChar).Value = dwData["VKSKOAUFKRS"].ToString(); 
          or1.Parameters.Add("VKSKOAUFLFD", OracleType.NVarChar).Value = dwData["VKSKOAUFLFD"].ToString(); 
          or1.Parameters.Add("VKSKOAUFPOS", OracleType.NVarChar).Value = dwData["VKSKOAUFPOS"].ToString(); 
          or1.Parameters.Add("VKSKOAUFART", OracleType.NVarChar).Value = dwData["VKSKOAUFART"].ToString(); 
          or1.Parameters.Add("VKSSTORUSER", OracleType.NVarChar).Value = dwData["VKSSTORUSER"].ToString(); 
          or1.Parameters.Add("VKSFILLER", OracleType.NVarChar).Value = dwData["VKSFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
